package com.cnyao.phot;

import android.app.ExpandableListActivity;
import android.os.Bundle;
import android.view.animation.AnimationUtils;
import android.view.animation.LayoutAnimationController;
import android.widget.ExpandableListView;

//TelephonyManager and PhoneStateListener

public class MyListActivity extends ExpandableListActivity {
	@Override
    public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.expandablelist);
		
		MyExpandListAdapter adapter=new MyExpandListAdapter(this);
		final ExpandableListView userList=(ExpandableListView)findViewById(android.R.id.list);
		userList.setAdapter(adapter);
		
		LayoutAnimationController controller=
        	AnimationUtils.loadLayoutAnimation(
        		this, R.anim.list_layout_anim2);
		for(int i=0;i<adapter.getGroupCount();i++)
		{
			userList.expandGroup(i);
		}
		userList.setLayoutAnimation(controller);
		
	}
}
